package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.constant.CommonConstant
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.math.BigDecimal
import java.util.*
import javax.persistence.*

/**
 * @author Fei
 */
@Entity
@Table(name = "en_enterprise_user")
@TableName("en_enterprise_user")
@ApiModel(value = "企业用户")
data class EnterpriseUser(

        @ApiModelProperty("企业名称")
        var companyName: String? = "",

        @ApiModelProperty("企业类型")
        var companyType: String? = "",

        @ApiModelProperty("法定代表人姓名")
        var legalUsername: String? = "",

        @ApiModelProperty("法定代表人联系方式")
        var legalPhone: String? = "",

        @ApiModelProperty("身份证号码")
        var cardNum: String? = "",

        @ApiModelProperty("生产经营范围")
        var businessScope: String? = "",

        @ApiModelProperty("主营业务所属行业")
        var businessId: String? = "",

        @ApiModelProperty("注册资本")
        var registerMoney: String = "",

        @ApiModelProperty("成立时间")
        var registerTime: String = "",

        @ApiModelProperty("区域id")
        var areaId: String? = null,

        @ApiModelProperty("注册地址")
        var registerAddress: String = "",


        /*----------------------注册人信息-------------------*/

        @ApiModelProperty("注册人姓名")
        var registerUserName: String? = "",

        @ApiModelProperty("注册人手机号")
        var registerUserPhone: String? = "",

        @ApiModelProperty("注册人头像")
        var avatar: String? = CommonConstant.USER_DEFAULT_AVATAR,

        @ApiModelProperty("注册人身份证号")
        var registerUserIdCard: String? = "",

        @ApiModelProperty("进入密码（6位）")
        var password: String? = "",

        @ApiModelProperty("组织机构代码")
        var organizingCode: String? = "",

        @ApiModelProperty("手持营业执照照片（，分割）")
        var licensePic: String? = "",

        @ApiModelProperty("身份证照片")
        var identityCard: String? = ""

) : XbootBaseEntityKt() {

        @Id
        @TableId
        override var id: String = SnowFlakeUtil.nextId().toString()

        companion object {
                private const val serialVersionUID = 1L
        }
}